package main

import (
	"fmt"
	"sort"
)

// findRepeatNumber 先排序 然后轮循 最直接的方法
func findRepeatNumber(nums []int) int {

	temp := -1
	sort.Ints(nums)

	for i := 0; i < len(nums); i++ {
		if nums[i] == temp {
			return nums[i]
		} else {
			temp = nums[i]
		}
	}
	return 0
}

// findRepeatNumber
func findRepeatNumberByChangeOrigal(nums []int) int {
	ints := make([]int, len(nums))
	for i := 0; i < len(nums); i++ {
		
	}

}

func main() {
	i := findRepeatNumber([]int{123, 123, 23, 23, 2, 33})
	fmt.Println("result ", i)
}
